package com.htd.apm.configure;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;


@ConfigurationProperties(
        prefix = "app.threadpool"
)
public class ThreadPoolProperties {

    private static final Logger log = LoggerFactory.getLogger(ThreadPoolProperties.class);
    public static final String PREFIX = "app.threadpool";
    private int threadMin = 5;
    private int threadMax = 50;
    private int threadQueue = 50;

    public ThreadPoolProperties() {
    }

    public int getThreadMin() {
        return this.threadMin;
    }

    public int getThreadMax() {
        return this.threadMax;
    }

    public int getThreadQueue() {
        return this.threadQueue;
    }

    public void setThreadMin(int threadMin) {
        this.threadMin = threadMin;
    }

    public void setThreadMax(int threadMax) {
        this.threadMax = threadMax;
    }

    public void setThreadQueue(int threadQueue) {
        this.threadQueue = threadQueue;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("threadMin", threadMin)
                .append("threadMax", threadMax)
                .append("threadQueue", threadQueue)
                .toString();
    }
}
